<template>
    <div class="app-container">
      <!--工具栏-->
      <div class="head-container">
        <!-- 搜索 -->
        <el-input v-model="query.prizeName" clearable placeholder="输入搜索内容" style="width: 200px;" class="filter-item"
          @keyup.enter.native="toQuery" />
    
        <el-button class="filter-item" size="mini" type="success" icon="el-icon-search" @click="toQuery">搜索</el-button>
        <!-- 新增 -->
        <div style="display: inline-block;margin: 0px 2px;">
       
          <el-button type="danger" class="filter-item" size="mini" icon="el-icon-refresh" @click="toQuery">刷新</el-button>
        </div>
      </div>
      <!--表单组件-->
      <!--表格渲染-->
      <el-table v-loading="loading" :data="data" size="small" style="width: 100%;">
        <el-table-column prop="id" width="140" label="换绑id">
        </el-table-column>
        <el-table-column prop="uid" label="人物id"></el-table-column>
      
        <el-table-column prop="nowSuperiorsId" label="上级id" />
        <el-table-column prop="originalSuperiorsId" label="下级id" />
        <el-table-column prop="createTime" width="160" label="换绑时间">
          <template slot-scope="scope">
            <span>{{ formatTimeTwo(scope.row.createTime) }}</span>
          </template>
        </el-table-column>
   
      </el-table>
      <!--分页组件-->
      <el-pagination :total="total" :current-page="page + 1" style="margin-top: 8px;"
        layout="total, prev, pager, next, sizes" @size-change="sizeChange" @current-change="pageChange" />
  
    </div>
  </template>
  
  <script>
  import initData from '@/mixins/crud'
  import { formatTimeTwo } from '@/utils/index'
  
  import '@riophae/vue-treeselect/dist/vue-treeselect.css'
  export default {
    mixins: [initData],
    data() {
      return {
        dropDownValue: '',
        delLoading: false,
        query: {},
        isAttr: false,
      }
    },
    created() {
        this.init().then(() => {

        })
    },
    methods: {
      formatTimeTwo, 
    
      beforeInit() {
        this.url = 'api/yxSystemMoveRecords'
        const sort = 'id,desc'
        this.params = { page: this.page, size: this.size, sort: sort }
        return true
      },
   
    }
  }
  </script>
  
  <style scoped></style>